package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.bifang.engine.assistant.core.enums.BoolEnum;
import com.jwsoft.manager.common.enums.EduBlackListTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 学生报名黑名单
 *
 * @author chenzh
 * @since 2023-08-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_student_enroll_blacklist")
@Schema(name = "EduStudentEnrollBlacklist", title = "学生报名黑名单", description = "学生报名黑名单实体类")
public class EduStudentEnrollBlacklist extends Model<EduStudentEnrollBlacklist> {

    public EduStudentEnrollBlacklist(){
        this.blacklistType = EduBlackListTypeEnum.hyj.getType();
        this.status = BoolEnum.TRUE.getType();
        this.encryptionFlag = BoolEnum.FALSE.getType();
    }

    private static final long serialVersionUID = 1L;

    @Schema(name = "studentEnrollBlacklistId", description = "主键")
    @TableId(value = "student_enroll_blacklist_id", type = IdType.ASSIGN_ID)
    private Long studentEnrollBlacklistId;

    @Schema(name = "fullName", description = "学生姓名")
    @TableField(value = "full_name")
    private String fullName;

    @Schema(name = "idcard", description = "学生身份证")
    @TableField(value = "idcard")
    private String idcard;

    @Schema(name = "areaCode", description = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "blacklistType", description = "加入黑名单类型 1退回原籍就读")
    @TableField(value = "blacklist_type")
    private String blacklistType;

    @Schema(name = "blacklistMsg", description = "加入黑名单理由")
    @TableField(value = "blacklist_msg")
    private String blacklistMsg;

    @Schema(name = "status", description = "有效状态：0无效 1有效")
    @TableField(value = "status")
    private String status;

    @Schema(name = "encryptionFlag", description = "是否加密: 0否 1 是")
    @TableField(value = "encryption_flag")
    private String encryptionFlag;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "逻辑删除标志")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Override
    public Serializable pkVal() {
        return this.studentEnrollBlacklistId;
    }
}
